package com.breadenglish.cms.api.app.dao.impl;

import com.breadenglish.cms.api.app.dao.ComboboxDao;
import com.breadenglish.cms.api.app.domain.model.ComboboxData;
import com.breadenglish.cms.api.app.mapper.ComboboxMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 下拉列表数据库访问DAO实现
 * User: guoyao
 * Date: 13-12-23
 * Time: 下午2:52
 */
@Service("comboboxDao")
public class ComboboxDaoImpl implements ComboboxDao {

    @Resource
    private ComboboxMapper comboboxMapper;

    @Override
    public List<ComboboxData> queryDictByClass(String classId) {
        return comboboxMapper.queryDictByClass(classId);
    }


    @Override
    public List<ComboboxData> queryProvince(Integer districtId) {
        return comboboxMapper.queryProvince(districtId);
    }

    @Override
    public List<ComboboxData> queryCity(String provinceId) {
        return comboboxMapper.queryCity(provinceId);
    }

    @Override
    public List<ComboboxData> queryArea(String cityId) {
        return comboboxMapper.queryArea(cityId);
    }



}
